mmc: Protect `mmc_initialize` from initialising mmc multiple times
authorDaniel Kochmański <[email protected]>
Fri, 29 May 2015 14:55:43 +0000 (16:55 +0200)
committerHans de Goede <[email protected]>
Fri, 24 Jul 2015 14:17:08 +0000 (16:17 +0200)
commit1b26bab12e85e8b0d382d6775e40d14445249574
treeba3b7462f730fb9bdb0788c64590f2e53d4c4256
parent413978d118bb7d7b0a8488d97d802f2899cd81ce
mmc: Protect `mmc_initialize` from initialising mmc multiple times

`mmc_initialize` might be called multiple times leading to the mmc-controllers
being initialised twice, and initialising the `mmc_devices` list head twice
which may lead to memory leaks.

Signed-off-by: Daniel Kochmański <[email protected]>
CC: Roy Spliet <[email protected]>
Cc: Ian Campbell <[email protected]>
CC: Pantelis Antoniou <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
drivers/mmc/mmc.c